]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
perf: Stop using GTK
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 4 Apr 2019 13:45:01 +0000 (15:45 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Thu, 11 Apr 2019 17:27:50 +0000 (17:27 +0000)
Instead of going through GtkSettings, we can just as well use the
underlying GSettings directly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/481

js/perf/hwtest.js

index 31a25a715744c16fcbc7d9c3d1b735d4ad2f3ddd..661f2ef9a610ddb1712bb57dbe4b169870ca612c 100644 (file)
@@ -1,4 +1,4 @@
-const { Clutter, Gio, Gtk, Shell } = imports.gi;
+const { Clutter, Gio, Shell } = imports.gi;
 const Main = imports.ui.main;
 const Scripting = imports.ui.scripting;
 
@@ -104,7 +104,10 @@ function *run() {
     yield Scripting.waitLeisure();
     Scripting.scriptEvent('desktopShown');
 
-    Gtk.Settings.get_default().gtk_enable_animations = false;
+    let interfaceSettings = new Gio.Settings({
+        schema_id: 'org.gnome.desktop.interface'
+    });
+    interfaceSettings.set_boolean('enable-animations', false);
 
     Scripting.scriptEvent('overviewShowStart');
     Main.overview.show();
@@ -200,7 +203,7 @@ function *run() {
 
     yield Scripting.sleep(1000);
 
-    Gtk.Settings.get_default().gtk_enable_animations = true;
+    interfaceSettings.set_boolean('enable-animations', true);
 }
 
 let overviewShowStart;